package com.shop.dao;

import com.shop.entity.SalesUser;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface SalesUserDao extends JpaRepository<SalesUser, Integer> {
    /**
     * 根据用户名，密码查询用户
     * @param username
     * @param password
     * @return
     */
    //@Select("INSERT INTO TABLE1 VALUES WHERE username = #{username} ")
    SalesUser findByUsernameAndPassword(String username, String password);

    /**
     * 根据用户名查询用户
     * @param username
     * @return
     */
    List<SalesUser> findByUsername(String username);
}
